#清空电池槽
execute if data entity @s item.components."minecraft:custom_data".guardTowerData{PowerInputEmpty:true} run return fail

data modify entity @s item.components."minecraft:custom_data".guardTowerData.PowerInputEmpty set value true

function util:entity_owner/find_son_distance10 with entity @s

execute at @n[tag=son_entity,distance=..10,type=item_display,tag=guardTower.powerItemDisplay] positioned ^ ^ ^0.3 run function vs:system/game_ctrol/guard_tower/power/output_battery

execute as @e[tag=son_entity,distance=..10,type=item_display,tag=guardTower.powerItemDisplay] at @s run function vs:system/game_ctrol/guard_tower/power/item_display/empty

function vs:system/game_ctrol/guard_tower/power/update_power_display

tag @e[tag=son_entity,distance=..20] remove son_entity